﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddCustomer.aspx.cs" Inherits="ZX.WebApp.Crm.Customer.AddCustomer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/container/assets/skins/sam/container.css" />
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/button/assets/skins/sam/button.css" />
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/layout/assets/skins/sam/layout.css" />
    <link rel="stylesheet" type="text/css" href="../../Scripts/yui_2.9.0/build/datatable/assets/skins/sam/datatable.css" />
    <link rel="stylesheet" type="text/css" href="../../Scripts/yui_2.9.0/build/resize/assets/skins/sam/resize.css" />
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/element/element-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/datasource/datasource-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/json/json-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/dragdrop/dragdrop-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/get/get-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/datatable/datatable-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/paginator/paginator-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/layout/layout-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/button/button-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/container/container-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/resize/resize-min.js"></script>
    <script src="../../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.json-2.2.js" type="text/javascript"></script>
    <script src="../../Scripts/Jquery.form.js" type="text/javascript"></script>
    <script src="../../Scripts/inputDate.js" type="text/javascript"></script>
    <script src="../../Scripts/extend.validate.js" type="text/javascript"></script>
    <script src="../../Scripts/tab.min.js" type="text/javascript"></script>
    <script src="../../Scripts/CombinButton.js" type="text/javascript"></script>
    <link href="../../Styles/tab.min.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/extendTable.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/base.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery.calendar.js" type="text/javascript"></script>
    <link href="../../Styles/default/calendar.css" rel="stylesheet" type="text/css" />
</head>
<script src="../../Scripts/Appjs/model.AddCustomer.Extend.js" type="text/javascript"></script>
<body class="yui-skin-sam" onkeydown="PreventBSK()">
    <form id="form1" runat="server">

    <div id="toolbar" style="margin-top: 3px;">
        <button type="button" id="btnClose" name="btnClose">
            退出</button>
        <button type="button" id="btnSave" name="btnSave">
            保存</button>
        <button type="button" id="btnModify" name="btnModify">
            修改</button>
        <button type="button" id="btnSCustomer" name="btnClose">
            转我的客户</button>
        <button type="button" id="btnPrivateCustomer" name="btnClose">
            转私海</button>
        <button type="button" id="btnOrderField" name="btnOrderField">
            转约场订单</button>
        <button type="button" id="btnReturn" name="btnReturn">
            退回</button>
    </div>
    <div class="fieldForm" id="fieldForm">
       <div id="content">
            <h3>客户基本信息</h3>
            <table class="table1">
                <tr>
                    <th width="14%">
                        <span style="color: Red">*</span><span>客户编码</span>
                    </th>
                    <td width="36%">
                        <input runat="server" type="text" id="Code" name="Code" readonly="readonly" class="width35"
                            style="background-color: #e7eaf4;" />
                    </td>
                    <th width="14%">
                        <span>信息专员</span>
                    </th>
                    <td width="36%">
                        <span style='color: #FF0000'>
                            <input runat="server" type="text" id="txtAddUserId" name="txtAddUserId" readonly="readonly"
                                class="width35" style="background-color: #e7eaf4;" />
                            <input type="hidden" runat="server" id="hiddenAddUser" name="hiddenAddUser" />
                            <input type="hidden" runat="server" id="AddTime" name="AddTime" />
                            <input type="hidden" runat="server" id="ModifyUser" name="ModifyUser" />
                            <input type="hidden" runat="server" id="ModifyTime" name="ModifyTime" />
                        </span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>客户名称</span>
                    </th>
                    <td colspan="3">
                        <input runat="server" type="text" id="CustomerName" name="CustomerName" onkeydown="showSetNum('CustomerName','ShowCustoemrName',50)"
                            onkeyup="showSetNum('CustomerName','ShowCustoemrName',50)" onblur="ValidateCustomerName(this.value,'客户名称','CustomerName','ShowCustoemrName');"
                            class="width30" />
                        <img id="btnCheckCustomerName" onclick="CheckCustomerName()" title="检查客户名称是否可用?"
                            alt="检查客户名称是否可用?" src="../../Images/search01.png" style="cursor: hand; vertical-align: bottom;" />
                        <img id="btnBaiduSearch_CustomerName" onclick="fnBaiduSearch('CustomerName');" title="百度搜索" alt="百度搜索" src="../../Images/baidu.png"
                            style="cursor: hand; vertical-align: bottom;" />
                        <img id="btnGoogleSearch_CustomerName" onclick="fnGoogleSearch('CustomerName');" title="Google搜索" alt="Google搜索" src="../../Images/google.png"
                            style="cursor: hand; vertical-align: bottom;" />
                        <span class="span_font">(0-50字)请填写完整公司全称</span> <span class="span_font" id="ShowCustoemrName">
                        </span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>公司地址</span>
                    </th>
                    <td colspan="3">
                        <asp:DropDownList ID="State" name="State" runat="server" AppendDataBoundItems="true">
                            <asp:ListItem Value="中国">中国</asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="Province" name="Province" runat="server" AppendDataBoundItems="true">
                            <asp:ListItem Value=" ">选择省份</asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="City" name="City" runat="server" AppendDataBoundItems="true">
                            <asp:ListItem Value=" ">选择城市</asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="Area" name="Area" runat="server" AppendDataBoundItems="true">
                            <asp:ListItem Value=" ">选择区县</asp:ListItem>
                        </asp:DropDownList>
                        <input runat="server" type="text" id="Address" name="Address" onkeydown="showSetNum('Address','ShowAddress',100)"
                            onkeyup="showSetNum('Address','ShowAddress',100)" onblur="showSetNull('ShowAddress')"
                            style="width: 21%;" />
                        <span class="span_font" id="ShowAddress"></span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>决策人姓名</span>
                    </th>
                    <td>
                        <input runat="server" type="text" id="Decisionmaker" onblur="IsChinese(this.value,'决策人','Decisionmaker')"
                            size="30" maxlength="30" name="Decisionmaker" class="width35" />
                    </td>
                    <th>
                        <span style="color: Red">*</span><span>决策人性别</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="DecisionSex" name="DecisionSex" runat="server" class="width38">
                            <asp:ListItem Value=""> </asp:ListItem>
                            <asp:ListItem Value="M">男</asp:ListItem>
                            <asp:ListItem Value="F">女</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>决策人手机1</span>
                    </th>
                    <td>
                        <input type="text" runat="server" id="DecisionTel" name="DecisionTel" onkeypress="return(event.keyCode>47&&event.keyCode<58)"
                            onpaste="return !clipboardData.getData('text').match(/\D/)" maxlength="11" class="width35" />
                        <img id="btnDecisionTel" onclick="CheckDecisionTel(1)" title="检查决策人手机是否存在?" alt="检查决策人手机是否存在?"
                            src="../../Images/search01.png" style="cursor: hand; vertical-align: bottom;" />
                        <input type="button" id="btnShowTel" value="显示" class="btnCheck" onclick="ShowTel(1);" />
                        <input type="hidden" id="hiddenDecisionTel" runat="server" />
                        <img id="btnBaiduSearch_DecisionTel" onclick="fnBaiduSearch('hiddenDecisionTel');" title="百度搜索" alt="百度搜索" src="../../Images/baidu.png"
                            style="cursor: hand; vertical-align: bottom; display:none;" />
                        <img id="btnGoogleSearch_DecisionTel" onclick="fnGoogleSearch('hiddenDecisionTel');" title="Google搜索" alt="Google搜索" src="../../Images/google.png"
                            style="cursor: hand; vertical-align: bottom; display:none;" />
                    </td>
                    <th>
                        <span>决策人手机2</span>
                    </th>
                    <td>
                        <input type="text" runat="server" id="DecisionTel2" name="DecisionTel2" onkeypress="return(event.keyCode>47&&event.keyCode<58)"
                            onpaste="return !clipboardData.getData('text').match(/\D/)" maxlength="11" class="width35" />
                        <img id="btnDecisionTel2" onclick="CheckDecisionTel(2)" title="检查决策人手机是否存在?" alt="检查决策人手机是否存在?"
                            src="../../Images/search01.png" style="cursor: hand; vertical-align: bottom;" />
                        <input type="button" id="btnShowTel2" value="显示" class="btnCheck" onclick="ShowTel(2);" />
                        <input type="hidden" id="hiddenDecisionTel2" runat="server" />
                        <img id="btnBaiduSearch_DecisionTel2" onclick="fnBaiduSearch('hiddenDecisionTel2');" title="百度搜索" alt="百度搜索" src="../../Images/baidu.png"
                            style="cursor: hand; vertical-align: bottom; display:none;" />
                        <img id="btnGoogleSearch_DecisionTel2" onclick="fnGoogleSearch('hiddenDecisionTel2');" title="Google搜索" alt="Google搜索" src="../../Images/google.png"
                            style="cursor: hand; vertical-align: bottom; display:none;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>决策人职位</span>
                    </th>
                    <td>
                        <input runat="server" type="text" id="DecisionPosition" onblur="IsChinese(this.value,'决策人职务','DecisionPosition')"
                            size="20" maxlength="20" name="DecisionPosition" class="width35" />
                    </td>
                    <th>
                        <span style="color: Red">*</span><span>公司电话1</span>
                    </th>
                    <td>
                        <input type="text" runat="server" id="Tel1" name="Tel1" onblur="IsTel(this.value,'公司电话1','Tel1')"
                            class="width35" />
                        <img id="btnBaiduSearch_Tel1" onclick="fnBaiduSearch('Tel1');" title="百度搜索" alt="百度搜索" src="../../Images/baidu.png"
                            style="cursor: hand; vertical-align: bottom;" />
                        <img id="btnGoogleSearch_Tel1" onclick="fnGoogleSearch('Tel1');" title="Google搜索" alt="Google搜索" src="../../Images/google.png"
                            style="cursor: hand; vertical-align: bottom;" />
                        <span class="span_font">格式:0755-12345678</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>主营业务</span>
                    </th>
                    <td>
                        <input runat="server" type="text" id="CompanyProduct" name="CompanyProduct" size="100"
                            maxlength="100" class="width35" />
                    </td>
                    <th>
                        <span>公司电话2</span>
                    </th>
                    <td>
                        <input type="text" runat="server" id="Tel2" name="Tel2" onblur="IsTel(this.value,'公司电话2','Tel2')"
                            class="width35" />
                        <span class="span_font">格式:0755-12345678</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>决策人邮箱</span>
                    </th>
                    <td>
                        <input runat="server" type="text" id="DecisionEmail" name="DecisionEmail" onblur="isEmail(this.value,'决策人邮箱','DecisionEmail')"
                            class="width35" />
                        <span class="span_font">格式:name@example.com</span>
                    </td>
                    <th>
                        <span>邮政编码</span>
                    </th>
                    <td>
                        <input runat="server" type="text" id="Post" name="Post" onkeyup="this.value=this.value.replace(/\D/g,'')"
                            onafterpaste="this.value=this.value.replace(/\D/g,'')" size="6" maxlength="6"
                            class="width35" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>客户关注</span>
                    </th>
                    <td>
                        <input runat="server" type="text" size="100" maxlength="100" id="CompanyAttention"
                            name="CompanyAttention" class="width35" />
                    </td>
                    <th>
                        <span>客户见证</span>
                    </th>
                    <td>
                        <input runat="server" type="text" size="50" maxlength="50" id="CusTestimony" name="CusTestimony"
                            class="width35" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>电子传真</span>
                    </th>
                    <td>
                        <input runat="server" type="text" size="20" maxlength="20" id="Fax" name="Fax" class="width35" />
                    </td>
                    <td colspan="2">
                        &nbsp;
                    </td>
                </tr>
            </table>
            <h3>
                公司基本信息</h3>
            <table class="table1">
                <tr>
                    <th>
                        <span>成立日期</span>
                    </th>
                    <td>
                        <input runat="server" type="text" id="CompanyCreateDate" name="CompanyCreateDate"
                            readonly="readonly" class="width35" size="10" maxlength="10" />
                        <%--<input runat="server" type="text" id="CompanyCreateDate" name="CompanyCreateDate"
                        class="width35" size="10" maxlength="10" onfocus="javascript:vDateType='2';"
                        onkeyup="DateFormat(this,this.value,event,false,'2')" onblur="DateFormat(this,this.value,event,true,'2')" />--%>
                        <span class="span_font">格式:2012-01-01</span>
                    </td>
                    <th>
                        <span>公司邮箱</span>
                    </th>
                    <td>
                        <input runat="server" type="text" size="30" maxlength="30" id="Email" name="Email"
                            onblur="isEmail(this.value,'公司邮箱','Email')" class="width35" />
                        <span class="span_font">格式:name@example.com</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>公司网站</span>
                    </th>
                    <td>
                        <input runat="server" type="text" id="CompanyNetting" name="CompanyNetting" class="width35" />
                    </td>
                    <th>
                        <span>助记码</span>
                    </th>
                    <td>
                        <input runat="server" type="text" size="30" maxlength="30" id="MnemonicCode" name="MnemonicCode"
                            class="width35" />
                    </td>
                </tr>
                <tr>
                    <th width="14%">
                        <span style="color: Red">*</span><span>员工人数</span>
                    </th>
                    <td width="36%">
                        <asp:DropDownList ID="PersonId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <th width="14%">
                        <span style="color: Red">*</span><span>客户区域</span>
                    </th>
                    <td width="36%">
                        <%--<asp:DropDownList ID="AreaId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>--%>
                        <input type="hidden" id="AreaId" name="AreaId" runat="server" />
                        <input type="text" id="txtAreaId" runat="server" name="txtAreaId" readonly="readonly"
                            class="width35" />
                        <button id="btnAreaId" name="100" type="button" runat="server" class="btnCheck" style="height: 25px;">
                            选择</button>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>客户类型</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="TypeId" runat="server" class="width38">
                        </asp:DropDownList>
                    </td>
                    <th>
                        <span style="color: Red">*</span><span>所属行业</span>
                    </th>
                    <td>
                        <%--<asp:DropDownList ID="TradeId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>--%>
                        <input type="hidden" id="TradeId" name="TradeId" runat="server" />
                        <input type="text" id="txtTradeId" runat="server" name="txtTradeId" readonly="readonly"
                            class="width35" />
                        <button id="btnTradeId" name="11" type="button" runat="server" class="btnCheck" style="height: 25px;">
                            选择</button> 
                        <button id="search_btn" type="button" class="btnCheck" style="height: 25px;">搜索</button>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>公司产值</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="ProductId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <th>
                        <span style="color: Red">*</span><span>客户来源</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="OriginId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>公司性质</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="PropertyId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <th>
                        <span style="color: Red">*</span><span>客户级别</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="LevelId" runat="server" class="width38" AppendDataBoundItems="true">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>商会</span>
                    </th>
                    <td>
                        <input runat="server" type="text" id="UnionId" name="UnionId" onkeydown="showSetNum('UnionId','ShowUnion',100)"
                            onkeyup="showSetNum('UnionId','ShowUnion',100)" onblur="showSetNull('ShowUnion')"
                            class="width35" />
                        <span class="span_font">(0-100字)</span> <span class="span_font" id="ShowUnion"></span>
                    </td>
                    <td colspan="2">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>管理中遇到问题</span>
                    </th>
                    <td colspan="3">
                        <textarea runat="server" id="ManagerQuestion" name="ManagerQuestion" onkeydown="showSetNum('ManagerQuestion','ShowManagerQuestion',500)"
                            onkeyup="showSetNum('ManagerQuestion','ShowManagerQuestion',500)" onblur="showSetNull('ShowManagerQuestion')"
                            style="width: 65%; height: 50px;"></textarea>
                        <span class="span_font">(0-500字)</span> <span class="span_font" id="ShowManagerQuestion">
                        </span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>未来3-5年战略目标</span>
                    </th>
                    <td colspan="3">
                        <textarea runat="server" id="StrongPoint" name="StrongPoint" onkeydown="showSetNum('StrongPoint','ShowStrongPoint',200)"
                            onkeyup="showSetNum('StrongPoint','ShowStrongPoint',200)" onblur="showSetNull('ShowStrongPoint')"
                            style="width: 65%; height: 50px;"></textarea>
                        <span class="span_font">(0-200字)</span> <span class="span_font" id="ShowStrongPoint">
                        </span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>备注</span>
                    </th>
                    <td colspan="3">
                        <textarea runat="server" id="Explain" name="Explain" onkeydown="showSetNum('Explain','ShowExplain',500)"
                            onkeyup="showSetNum('Explain','ShowExplain',500)" onblur="showSetNull('ShowExplain')"
                            style="width: 65%; height: 50px;"></textarea>
                        <span class="span_font">(0-500字)</span> <span class="span_font" id="ShowExplain">
                        </span>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div class="tab" id="fieldTab">
        <h1>
            <a href="#" id="a2" class="current">行销中心记录</a><a href="#" id="a1">联系人</a>
                <a href="#" id="a3">附件</a><a href="#" id="a4">订单</a><a href="#" id="a5">缴款单</a> 
                <a href="#" id="a6">讲师总结</a>
        </h1>
        <ul>
            <div id="con_2">
            </div>
            <button type="button" id="btnAddLinkRecord" name="btnAddLinkRecord" onclick="ShowActivity();"
                class="btnCheck" style="width: 60px; height: 25px;">
                新增记录</button>&nbsp;&nbsp;
           <%-- <button type="button" id="btnDeleteLinkRecord" name="btnDeleteLinkRecord" onclick="DeleteActivity();"
                class="btnCheck" style="width: 60px; height: 25px;">
                删除记录</button>--%>
        </ul>
        <ul style="display: none">
            <div id="con_1">
            </div>
            <button type="button" id="btnAddLinkMan" name="btnAddLinkMan" onclick="ShowLinkMan();"
                class="btnCheck" style="width: 80px; height: 25px;">
                新增联系人</button>&nbsp;&nbsp;
            <button type="button" id="btnDeleteLinkMan" name="btnDeleteLinkMan" class="btnCheck"
                style="width: 80px; height: 25px;" onclick="DeleteLinkMan();">
                删除联系人</button>
        </ul>
        <ul style="display: none">
            <div id="con_3">
            </div>
            <button type="button" id="btnAddAttach" name="btnAddAttach" onclick="ShowAttach();"
                class="btnCheck" style="width: 60px; height: 25px;">
                新增附件</button>&nbsp;&nbsp;
            <button type="button" id="btnDeleteAttach" name="btnDeleteAttach" onclick="DeleteAttach();"
                class="btnCheck" style="width: 60px; height: 25px;">
                删除附件</button>
        </ul>
        <ul style="display: none">
            <div id="con_4">
            </div>
        </ul>
        <ul style="display: none">
            <div id="con_5">
            </div>
        </ul>
        <ul style="display: none">
            <div id="con_6">
            </div>
        </ul>
    </div>
    <script type="text/javascript">
        //鼠标滑过显示一次引用，实现多个切换
        /*var slides = ["fieldbottom"];
        for (var i = 0; i < slides.length; i++) {
        var elemTit = document.getElementById(slides[i]).getElementsByTagName("h1")[0].getElementsByTagName("span");
        var elemCon = document.getElementById(slides[i]).getElementsByTagName("ul");
        slide({ handle: elemTit, content: elemCon, current: "current", mode: "mouseover" });
        }*/
        //鼠标点击显示
        slide({
            handle: document.getElementById("fieldTab").getElementsByTagName("h1")[0].getElementsByTagName("a"),
            content: document.getElementById("fieldTab").getElementsByTagName("ul"),
            current: "current",
            mode: "click"
        }); 
    </script>
    <asp:HiddenField ID="ID" runat="server" />
    <div id="dialog1" class="yui-pe-content">
        <div class="hd">
            客户信息</div>
        <div class="bd">
            <iframe id="EditUIWindow1" frameborder="0" src="" style="width: 100%; height: 100%;
                margin: 0px; padding: 0px;"></iframe>
        </div>
    </div>
    <div id="dialog2" class="yui-pe-content">
        <div class="hd">
            上传附件</div>
        <div class="bd">
            <iframe id="EditUIWindow2" frameborder="0" src="" style="width: 100%; height: 100%;
                margin: 0px; padding: 0px;"></iframe>
        </div>
    </div>
    <div id="dialog3" class="yui-pe-content">
        <div class="hd">
            添加联系人</div>
        <div class="bd">
            <iframe id="EditUIWindow3" frameborder="0" src="" style="width: 100%; height: 100%;
                margin: 0px; padding: 0px;"></iframe>
        </div>
    </div>
    <div id="dialog7" class="yui-pe-content">
        <div class="hd">
            添加行销中心记录</div>
        <div class="bd">
            <iframe id="EditUIWindow7" frameborder="0" src="" style="width: 100%; height: 100%;
                margin: 0px; padding: 0px;"></iframe>
        </div>
    </div>
    <div id="dialog4" class="yui-pe-content">
        <div class="hd">
            客户退回</div>
        <div class="bd">
            <textarea id="CustomerReturn" name="CustomerReturn" style="width: 98%; height: 95%;"></textarea>
        </div>
    </div>
    <div id="dialog5" class="yui-pe-content">
        <div class="hd">
            手机信息</div>
        <div class="bd" style="text-align: center;">
            手机：<input type="text" readonly="readonly" id="txtTel" />
        </div>
    </div>
    <div id="dialog6" class="yui-pe-content">
        <div class="hd">
            信息</div>
        <div class="bd">
            <iframe id="EditUIWindow6" frameborder="0" src="" style="width: 100%; height: 100%;
                margin: 0px; padding: 0px;"></iframe>
        </div>
    </div>
    </form>
    <form id="form2" style="display: none" action="../../Extend/AjaxData/DataSave.aspx">
    <textarea style="display: none" id="jsonDataContent" rows="2" cols="2" name="jsonDataContent"></textarea>
    </form>
    <form id="form3" style="display: none" action="../../Extend/AjaxData/DataSave.aspx">
    <textarea style="display: none" id="jsonDataLog" rows="2" cols="2" name="jsonDataLog"></textarea>
    </form>
</body>
<script type="text/javascript">
    var action="<% =DataAction %>",entity="<% =EntityName %>",
        flag="<%=Flag %>",type="<%=Type %>",back="<%=Return %>",
        userid="<%=UserID %>",returnId="<%=ReturnId %>",postName="<%=this.EmpPropertyValues.PostName %>",
        condition = "";
    var vLinkMan=[<%=LinkMan %>], //联系人信息
        vLinkRecord=[<%=LinkRecord %>], //行销中心记录
        vAttach=[<%=Attach %>],   //附件信息
        vOrder=[<%=Order %>],  //订单信息
        vPay=[<%=Pay %>],   //缴款单信息       
        vTeachSump=[<%=TeachSump %>],  //讲师总结
        vCustomerOld=[<%=Customer %>]; //客户数据
    <asp:Literal ID="EditTemplate" runat="server"></asp:Literal>
    (function () {
        var Dom = YAHOO.util.Dom,
            Event = YAHOO.util.Event;
            Event.onDOMReady(function () {
            var layout = new YAHOO.widget.Layout({
                units: [
                    { position: 'top', height: 35, body: 'toolbar', gutter: '1 1 1 1', scroll: null, zIndex: 2 },
                    { position: 'center', body: 'fieldForm', gutter: '1 1 1 1', scroll: true },
                    { position: 'bottom', height: 165, body: 'fieldTab', gutter: '10 1 1 1', 
                        scroll: true, resize: true}
                    ]
            });
            layout.render();
        });
        $("#CompanyCreateDate").cld();

        $("#search_btn").click(function(){
            var vl = $("#txtTradeId").val();
            if (vl == "") {
                alert("请输入关键字");
                return;
            }
            var url = "../../KM/FullTextSearch/FullTextSearchList.aspx?key=" + vl+"&SearchOther=yes&r="+Math.random();
            var pagetitle = "全文搜索";
            window.parent.$("#tabs").tabs('close', pagetitle);
            window.parent.addTabs(pagetitle, url);
        });

    })();
    var Url = "../../Extend/AjaxData/CustomOperating.aspx";
    var UrlNum = "../../Extend/AjaxData/DataProcessin.aspx";
    var myDataSource1, mDataTable1, mDataTable2, myDataSource2,
        mDataTable3, myDataSource3,mDataTable4, myDataSource4,
        mDataTable5, myDataSource5,mDataTable6, myDataSource6;
    var btnSave="",btnModify="",btnClose="",btnNews1="",btnDeletes1="",
        btnSaves1="",btnNews2="",btnDeletes2="",btnSaves2="",btnAddAttach="",btnDeleteAttach="",
        btnSCustomer="", btnPrivateCustomer="",btnReturn="",btnOrderField="";
    var vid = $('#ID').val();   
    //关闭当前页
    var fnClose = function () {
        window.parent.$("#tabs").tabs('close', '<%=PageTitle %>');
    }
    //百度搜索
    var fnBaiduSearch = function(id){
        if(action=="insert"){
            if(id=="hiddenDecisionTel"){
                id="DecisionTel";
            }else if(id=="hiddenDecisionTel2"){
                id="DecisionTel2";
            }
        }
        var txtValue= $("#"+id+"").val();
        if(txtValue==""){
            $("#"+id+"").focus();
            return;
        }else{
            window.parent.$("#tabs").tabs('close', '百度搜索');
            var pagetitle = "百度搜索";
            parent.addTabs(pagetitle, 'http://www.baidu.com/baidu?tn=baidu&ie=UTF-8&word='+txtValue);
            parent.NeedRefreshPage = this;
            //parent.window.open("http://www.baidu.com/baidu?tn=baidu&ie=UTF-8&word="+encodeURI(txtCustomerName));
        }
    }
    //Google搜索
    var fnGoogleSearch = function(id){
        if(action=="insert"){
            if(id=="hiddenDecisionTel"){
                id="DecisionTel";
            }else if(id=="hiddenDecisionTel2"){
                id="DecisionTel2";
            }
        }
        var txtValue = $("#"+id+"").val();
        if(txtValue==""){
            $("#"+id+"").focus();
            return;
        }else{
            parent.window.open("http://www.google.com.hk/search?hl=zh-CN&newwindow=1&safe=strict&tbo=d&q="+encodeURI(txtValue));
        }
    }
</script>
<script src="../Scripts/appjs/model.<% =EntityName %>.js" type="text/javascript"
    language="javascript"></script>

</html>
